<?php
    class AdminDthink_Form_ValidateCongratulations
    {
        public function validFullname($fullname) {
            $validate = new Zend_Validate_Alnum(true);
            if($validate->isValid($fullname)) {
                $validate = new Zend_Validate_StringLength(1, 50);
                if($validate->isValid($fullname)) {
                    return true;
                }
                else {
                    return false;
                }
            }
            else {
                return false;
            }
        }
        
        public function validContent($content) {
            $validate = new Zend_Validate_NotEmpty();
            if($validate->isValid($content)) {
                return true;
            }
            else {
                return false;
            }
        }
        
        public function validSearch($keyword) {
            $validate = new Zend_Validate_StringLength(3,50);
            if($validate->isValid($keyword)) {
                return true;
            }
            else {
                return false;
            }
        }
    }
